import java.util.*;

/**
 * @author LKQ
 * @date 2022/5/2 20:20
 * @description
 */
public class Solution {
    public static void main(String[] args) {
        Solution solution = new Solution();
        solution.sumGame("5023");
    }
    public boolean sumGame(String num) {
        char[] N = num.toCharArray();
        int n = N.length;
        int leftSum = 0, rightSum = 0, leftCnt = 0, rightCnt = 0;
        for (int i = 0; i < n; i++) {
            if (i < n / 2) {
                leftSum += (N[i] == '?' ? 0 : (N[i] - '0'));
                leftCnt += (N[i] == '?' ? 1 : 0);
            }else {
                rightSum += (N[i] == '?' ? 0 : (N[i] - '0'));
                rightCnt += (N[i] == '?' ? 1 : 0);
            }
        }
        if (((leftCnt + rightCnt) & 1) == 1) {
            // 总共奇数个？Alice总是赢
            return true;
        }
        return (9 * (leftCnt - rightCnt) / 2 + leftSum - rightSum) != 0;
    }
}
